package com.ndp.fb.rdb.api;

import com.ndp.fb.rdb.model.BusinessManager;

import java.util.List;

/**
 * Created by infi on 2015/1/29.
 */
public interface BusinessManagerRdbService {


    /**
     * 根据userId获取BusinessManager
     *
     * @param userId
     * @return
     */
    List<BusinessManager> findByUserId(String userId);
    /**
     * 根据userId获取BusinessManager
     *
     * @param userId
     * @return
     */
    List<BusinessManager> findByUserId(String userId,String role);

    /**
     * businessManager 是否已经关联到 user
     * true: 关联
     * false : 未关联
     *
     * @param fbBusinessesId
     * @return
     */
    BusinessManager findByFbBusinessesId(Long fbBusinessesId);

    /**
     * 保存 businessManager,也需要保存businessManager和user的关联关系
     *
     * @param businessManager
     * @return
     */
    Long saveBusinessManager(BusinessManager businessManager);
}
